<template>
  <div>App组件</div>
 <Son v-for="item in list" :key="item.id" :todo="item" ></Son>
</template>
  
<script setup lang="ts">
import { ref } from 'vue';
import Son from './components/Son.vue';
import { TodoItem } from './types/todo';
// 定义Todo类型
/* type TodoItem = {
  id: number;
  name: string;
  done: boolean;
}; */
const list = ref<TodoItem[]>([
  { id: 1, name: '李华', done: false },
  { id: 2, name: '梨花', done: true },
]);
</script>

<style scoped>
img {
  height: 300px;
}
</style>
